<?php
class ControllerCommonInfocustomer extends Controller {   
	protected function index() {
            
		$this->load->language('common/infocustomer');
		
		$this->data['text_username'] =$this->language->get('text_username');
                $this->data['text_email'] =$this->language->get('text_email');
                $this->data['text_address'] =$this->language->get('text_address');
                $this->data['text_mobilephone'] =$this->language->get('text_mobilephone');
                if(isset($_GET['id']))
                $idcustomer= $_GET['id'];
                if(isset($_GET['customerid']))
                    $idcustomer= $_GET['customerid'];
                $this->load->model('Mart_Crm/Crm_customer');
                $customer = $this->model_Mart_Crm_Crm_customer->getnamecustomer($idcustomer);
                $this->data['firstname'] = $customer[0]['first_name'];
                $this->data['lastname'] = $customer[0]['last_name'];
                $this->data['email'] = $customer[0]['email_address'];
                $this->data['telephone'] = $customer[0]['phone_mobile'];
                $this->data['address1'] = $customer[0]['alt_address_street'];
                $this->data['address2'] = $customer[0]['primary_address_street'];
                $this->data['city'] = $customer[0]['primary_address_city'];
                
		
		$this->template = 'common/infocustomer.tpl';
	
                $this->render();
  	}
}
?>